Skip to content

Debug module fixes and unit testing#216

Closed
wledfor2 wants to merge 5 commits into
moonsharp-devs:developfrom
wledfor2:getmetatablefix
Closed

Debug module fixes and unit testing#216
wledfor2 wants to merge 5 commits into
moonsharp-devs:developfrom
wledfor2:getmetatablefix

Conversation

@wledfor2

@wledfor2 wledfor2 commented Oct 8, 2017

Copy link
Copy Markdown
Contributor

This pull request makes several fixes to the debug module, and re-enables debug tap unit testing. All tests pass!

The fixes:

  1. Merged Fixed : call debug.getmetatable maybe cause NullReferenceException #173 to fix one issue with debug.getmetatable. Unfortunately, github does not support pull request dependencies, so I had to merge this before I went to work.
  2. Fixed a potential NullReferenceException when debug.getmetatable was called on a Lua type that COULD have a metatable assigned, but did not. For instance, the following code would throw an NRE:
local m = debug.getmetatable(true)
print(m)
  1. debug.setuservalue had a typo that caused it to always throw a ScriptRuntimeException regardless of arguments being correct or not.
  2. debug.setuservalue was returning a table, when the standard says it should return the userdata argument passed to it.
  3. Re-enabled debug unit tests, with unsupported debug functions commented out.

@wledfor2 wledfor2 changed the title Fixes another NullReferenceException in debug.getmetatable Debug module fixes and unit testing Oct 8, 2017
@wledfor2

Copy link
Copy Markdown
Contributor Author

Closing this until modern build, updating it would be a ton of work for both parties.

@wledfor2 wledfor2 closed this Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant